package com.salon.client.beans;

import java.util.Date;
import java.util.List;

public class ProcedureBean extends ParentBean {
	private int masterId;
	private int priceId;
	private int clientId;
	
	private String name;
	private String clientName;
	private String masterName;
	
	private float cost;
	private int percent;
	private int discount;
	private boolean status;
	
	private String desc;
	private Date date;
	private List<PriceBean> price;
	private ClientBean client;
	
	
	public int getDiscount() {
		return discount;
	}

	public void setDiscount(int discount) {
		this.discount = discount;
	}

	public int getPercent() {
		return percent;
	}

	public void setPercent(int percent) {
		this.percent = percent;
	}

	public boolean getStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	public ClientBean getClient() {
		return client;
	}

	public void setClient(ClientBean client) {
		this.client = client;
	}

	public List<PriceBean> getPrice() {
		return price;
	}

	public void setPrice(List<PriceBean> price) {
		this.price = price;
	}

	public int getMasterId() {
		return masterId;
	}

	public void setMasterId(int masterId) {
		this.masterId = masterId;
	}

	public int getPriceId() {
		return priceId;
	}

	public void setPriceId(int priceId) {
		this.priceId = priceId;
	}

	public int getClientId() {
		return clientId;
	}

	public void setClientId(int clientId) {
		this.clientId = clientId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getClientName() {
		return clientName;
	}

	public void setClientName(String clientName) {
		this.clientName = clientName;
	}

	public String getMasterName() {
		return masterName;
	}

	public void setMasterName(String masterName) {
		this.masterName = masterName;
	}

	public float getCost() {
		return cost;
	}

	public void setCost(float cost) {
		this.cost = cost;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
	public String getDecs() {
		if (getPrice() != null && getPrice().size() != 0) {
			String res = getPrice().get(0).getName();
			res += " " + ((int)getCost()) + " руб. ";
			if (clientName != null) {
				res += clientName;
			}
			return res;
		}
		else {
			return "&nbsp";
		}
	}
	
}
